package stringUtils

import (
	"log"
	"strconv"
)

func StrToFloat64(s string) float64 {
	float, _ := strconv.ParseFloat(s, 64)
	return float
}

func Float64ToStr(f float64) string {
	str := strconv.FormatFloat(f, 'f', -1, 64)
	return str
}

func StrToInt64(s string) int64 {
	res, err := strconv.ParseInt(s, 10, 64)
	if err != nil {
		log.Println("str2Int failed! err:", err)
		return 0
	}
	return res
}
